<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" />
	<title>我的产品</title>
	<link rel="stylesheet" type="text/css" href="css/public.css">
	<link rel="stylesheet" type="text/css" href="css/common.css">
</head>
<body>
	<div class="cont" v-cloak>
		<table class="info" v-for="item in products">
			<tr class="name">
				<td>产品名称</td>
				<td>{{item.body}}</td>
			</tr>
			<tr class="money">
				<td>金<b>金额</b>额</td>
				<td>{{((item.pay_fee * 0.01).toFixed(2))}}元</td>
			</tr>
			<tr class="code">
				<td>券<b>券码</b>码</td>
				<td>{{item.code}}</td>
			</tr>
			<tr class="time">
				<td>购买时间</td>
				<td>{{item.pay_time ? moment(item.pay_time).format("YYYY-MM-DD hh:mm:ss") : ''}}</td>
			</tr>
		</table>
	</div>
</body>
<script src="js/jquery-3.1.1.min.js"></script>
<script src="js/moment.min.js"></script>
<script src="js/vue.min.js"></script>
<script src="js/weixin-common.js"></script>
<script src="js/app-common.js"></script>
<script>
	var products = [];
	$.ajax({
		type: "GET",
		url: APP_CONFIG.listMyOrderUrl,
		data: {
			token: getUserToken()
		},
		success: function(res) {
			if (checkServiceResult(res)) {
				products = res.data;
				new Vue({
					el: ".cont",
					data: {
						products: products
					}
				});
			}
		}
	});
</script>
</html>
